package com.test.datastruct;

/**
 * Create by lu.jiang
 * Date 2021/4/14 11:33
 */
public class SkipList {
    private Node head;
    private Node tail;
    private int length;
    private int level; // 节点最多的层数


    private static class Node {
        private String key;
        private Object value;
        private int seq; // redis zset中的score
        private Node pre; // 指向前一个node，这里Node其实不需要next属性，Level中有就可以了
        private Level[] levels;
    }

    private static class Level {
        private Node next; // 用于指向下个node，然后在对应的node相同层级继续遍历
        private int span; // 两个node之间的间隔
    }

}

